class Config:
    ENV = 'development'
    LOG_PATH = '/data/logs/system'
    LOG_LEVEL = 'info'
    LOG_FILENAME = 'app.log'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    TOKEN_EXPIRATION = 86400

    BROKER_URL = 'redis://127.0.0.1:6379/0'
    RESULT_BACKEND = 'redis://127.0.0.1:6379/1'

    CELERY_CONFIG = {
        'timezone': 'Asia/Shanghai',
        'worker_prefetch_multiplier': 5,  # 每次去redis取任务的数量
        'worker_concurrency': 6,
        'task_serializer': 'msgpack',
        'result_serializer': 'json',
        'accept_content': ['json', 'msgpack'],
        'result_expires': 24 * 60 * 60,
        'task_compression': 'zlib'
    }



